package com.lovo.sys.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@TableName("sys_product")
@ApiModel(value = "商品实体", description = "商品实体")
public class ProductBean {
    @TableId(value = "pk_productId", type = IdType.AUTO)
    @ApiModelProperty(value = "产品id")
    private long productId;

    @TableField("p_productName")
    @ApiModelProperty(value = "商品名")
    private String productName;

    @TableField("p_type")
    @ApiModelProperty(value = "商品类型")
    private String type;

    @TableField("p_isPromotion")
    @ApiModelProperty(value = "商品属性 0-普通商品 1-促销商品 2- 待促销")
    private int isPromotion;

    @TableField("p_rate")
    @ApiModelProperty(value = "折扣率")
    private float rate;

    @TableField("p_price")
    @ApiModelProperty(value = "原价")
    private float price;

    @TableField("p_num")
    @ApiModelProperty(value = "数量")
    private int num;

    @TableField("p_status")
    @ApiModelProperty(value = "商品状态 0-闲置（默认）1-待上架 2-已上架 3-已下架")
    private int status;

    @TableField("p_bootomNum")
    @ApiModelProperty(value = "阈值")
    private int bootomNum=100;
    @ApiModelProperty(value = "Es雪花Id")
    @TableField("p_snowId")
    private String snowId;


    @TableField(exist = false)
    @ApiModelProperty("详情信息集合")
    private List<ProductInfoBean> productInfoList;
}
